package cn.ynny.demo01;

public class test {
    public static void main(String[] args) {
        Fruit f1 = new apple();
        f1.setName("苹果");
        f1.setArea("昭通");
        f1.setPrice(10);
        System.out.println(f1);

        Fruit f2 = new grape();
        f2.setName("葡萄");
        f2.setArea("曲靖");
        f2.setPrice(20);
        System.out.println(f2.toString());

        Fruit f3 = new mango();
        f3.setName("芒果");
        f3.setArea("玉溪");
        f3.setPrice(30);
        System.out.println(f3.toString());




    }
}
